using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace StoredProcedureMaker
{
    public partial class SPListForm : Form
    {
        DatabaseDB databaseDB = new DatabaseDB();
        public SPListForm()
        {
            InitializeComponent();
            BindList();
        }

        private void BindList()
        {
            lstSP.DataSource = databaseDB.GetSPStored();
            lstSP.DisplayMember = "SPName";
            lstSP.ValueMember = "SPName";
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void btnDetay_Click(object sender, EventArgs e)
        {
            FormSPDetail formSPDetail = new FormSPDetail(lstSP.SelectedValue.ToString());
            formSPDetail.ShowDialog();
        }
    }
}